﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucTinNhanMoi.ascx.cs"
    Inherits="STT.Admin.UserControls.ucTinNhanMoi" %>

<%--<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <%--<ContentTemplate>--%>
<div id="content-header">
    <div id="breadcrumb">
        <a href="../Admin/Default.aspx?idpage=1" class="tip-bottom" data-original-title="Về bảng điều khiển">
            <i class="icon-home"></i>Trang chính
        </a>
        <a href="../Admin/Default.aspx?" class="current">Tin nhắn mới</a>
    </div>
</div>

<div class="widget-box widget-chat">
    <div class="widget-title">
        <span class="icon">
            <i class="icon-comment"></i>
        </span>
        <h5>Tin nhắn mới</h5>
    </div>
    <div class="widget-content nopadding">
        <div class="chat-content no-margin">
            <div class="chat-messages" id="chat-messages">
                <% if (tb.Rows.Count > 0)
                   { %>
                <div id="chat-messages-inner">
                    <% for (int i = 0; i < tb.Rows.Count; i++)
                       { %>
                    <%                        
                                   if (lastTime != DateTime.Parse(tb.Rows[i]["ThoiGianGui"].ToString()).ToShortDateString())
                                       Response.Write("<div class='date_spend'>" + lastTime + "</div>");                                   
                    %>
                    <p style="display: block;" id="msg-1" class="user-laukik">
                        <span class="msg-block">
                            <img src='../../Uploads/Avatar/<% Response.Write(tb.Rows[i]["Anh"].ToString().TrimEnd() == "" ? "avatar-default.jpg" : tb.Rows[i]["Anh"].ToString().TrimEnd());%>'
                                alt="img"><strong><% Response.Write(tb.Rows[i]["TenNguoiGui"].ToString().TrimEnd());%></strong>
                            <span class="time">
                                <% Response.Write(DateTime.Parse(tb.Rows[i]["ThoiGianGui"].ToString()).ToLongTimeString());%></span><span
                                    class="msg"><% Response.Write(tb.Rows[i]["NoiDung"].ToString().TrimEnd());%></span></span>
                    </p>
                    <% } %>
                </div>
                <% } %>
                <% else Response.Write("<label class='lbThongBao'>Không có tin nhắn mới</label>"); %>
            </div>
        </div>
    </div>
</div>

<%--</asp:UpdatePanel>--%>
